package com.ruoyi.platform.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 聊天记录对象 chat_records
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
public class ChatRecords extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 聊天记录ID */
    @Excel(name = "聊天记录ID")
    private String chatId;

    /** 会话ID */
    @Excel(name = "会话ID")
    private String sessionId;

    /** 对话类型 */
    @Excel(name = "对话类型")
    private Long chatType;

    /** 用户ID */
    @Excel(name = "用户ID")
    private String customerId;

    /** 平台客服ID */
    @Excel(name = "平台客服ID")
    private String staffId;

    /** 商家ID */
    @Excel(name = "商家ID")
    private String merchantId;

    /** 发送者类型 */
    @Excel(name = "发送者类型")
    private Long senderType;

    /** 发送者ID */
    @Excel(name = "发送者ID")
    private String senderId;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String content;

    /** 附件信息 */
    @Excel(name = "附件信息")
    private String attachments;

    /** 消息类型 */
    @Excel(name = "消息类型")
    private Long messageType;

    /** 是否已读 */
    @Excel(name = "是否已读")
    private Long isRead;

    /** 服务评分 */
    @Excel(name = "服务评分")
    private Long serviceRating;

    /** 关联订单ID */
    @Excel(name = "关联订单ID")
    private String relatedOrderId;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sentAt;

    /** 阅读时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "阅读时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date readAt;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deletedAt;

    /** 预留字段1 */
    @Excel(name = "预留字段1")
    private String externField1;

    /** 预留字段2 */
    @Excel(name = "预留字段2")
    private String externField2;

    public void setChatId(String chatId) 
    {
        this.chatId = chatId;
    }

    public String getChatId() 
    {
        return chatId;
    }

    public void setSessionId(String sessionId) 
    {
        this.sessionId = sessionId;
    }

    public String getSessionId() 
    {
        return sessionId;
    }

    public void setChatType(Long chatType) 
    {
        this.chatType = chatType;
    }

    public Long getChatType() 
    {
        return chatType;
    }

    public void setCustomerId(String customerId) 
    {
        this.customerId = customerId;
    }

    public String getCustomerId() 
    {
        return customerId;
    }

    public void setStaffId(String staffId) 
    {
        this.staffId = staffId;
    }

    public String getStaffId() 
    {
        return staffId;
    }

    public void setMerchantId(String merchantId) 
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId() 
    {
        return merchantId;
    }

    public void setSenderType(Long senderType) 
    {
        this.senderType = senderType;
    }

    public Long getSenderType() 
    {
        return senderType;
    }

    public void setSenderId(String senderId) 
    {
        this.senderId = senderId;
    }

    public String getSenderId() 
    {
        return senderId;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setAttachments(String attachments) 
    {
        this.attachments = attachments;
    }

    public String getAttachments() 
    {
        return attachments;
    }

    public void setMessageType(Long messageType) 
    {
        this.messageType = messageType;
    }

    public Long getMessageType() 
    {
        return messageType;
    }

    public void setIsRead(Long isRead) 
    {
        this.isRead = isRead;
    }

    public Long getIsRead() 
    {
        return isRead;
    }

    public void setServiceRating(Long serviceRating) 
    {
        this.serviceRating = serviceRating;
    }

    public Long getServiceRating() 
    {
        return serviceRating;
    }

    public void setRelatedOrderId(String relatedOrderId) 
    {
        this.relatedOrderId = relatedOrderId;
    }

    public String getRelatedOrderId() 
    {
        return relatedOrderId;
    }

    public void setSentAt(Date sentAt) 
    {
        this.sentAt = sentAt;
    }

    public Date getSentAt() 
    {
        return sentAt;
    }

    public void setReadAt(Date readAt) 
    {
        this.readAt = readAt;
    }

    public Date getReadAt() 
    {
        return readAt;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    public void setDeletedAt(Date deletedAt) 
    {
        this.deletedAt = deletedAt;
    }

    public Date getDeletedAt() 
    {
        return deletedAt;
    }

    public void setExternField1(String externField1) 
    {
        this.externField1 = externField1;
    }

    public String getExternField1() 
    {
        return externField1;
    }

    public void setExternField2(String externField2) 
    {
        this.externField2 = externField2;
    }

    public String getExternField2() 
    {
        return externField2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("chatId", getChatId())
            .append("sessionId", getSessionId())
            .append("chatType", getChatType())
            .append("customerId", getCustomerId())
            .append("staffId", getStaffId())
            .append("merchantId", getMerchantId())
            .append("senderType", getSenderType())
            .append("senderId", getSenderId())
            .append("content", getContent())
            .append("attachments", getAttachments())
            .append("messageType", getMessageType())
            .append("isRead", getIsRead())
            .append("serviceRating", getServiceRating())
            .append("relatedOrderId", getRelatedOrderId())
            .append("sentAt", getSentAt())
            .append("readAt", getReadAt())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .append("deletedAt", getDeletedAt())
            .append("externField1", getExternField1())
            .append("externField2", getExternField2())
            .toString();
    }
}
